class LightUser {
  String id;
  String? title;
  String? content;
  String userId;
  String? userNickname;
  String userAvatar;
  int followState;

  LightUser({
    required this.id,
    this.title,
    this.content,
    required this.userId,
    this.userNickname,
    required this.userAvatar,
    required this.followState,
  });

  factory LightUser.fromJson(Map<String, dynamic> json) {
    return LightUser(
      id: json['id'] as String,
      title: json['title'] as String,
      content: json['content'] as String,
      userId: json['userId'] as String,
      userNickname: json['userNickname'] as String,
      userAvatar: json['userAvatar'] as String,
      followState: json['followState'] as int,
    );
  }

  Map<String, dynamic> toJson() {
    return {
      'id': id,
      'title': title,
      'content': content,
      'userId': userId,
      'userNickname': userNickname,
      'userAvatar': userAvatar,
      'followState': followState,
    };
  }
}
